/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package parismetro;

import javafx.scene.CustomNode;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.Group;
import javafx.scene.shape.Rectangle;
import javafx.scene.text.Text;
import javafx.scene.Node;
import javafx.scene.text.TextAlignment;

// IL FAUT INITIALISER text, htr ET montant
// htr =

/**
 * @author Manu
 */
def f:Font = Font{size:18, name:"MyriadPro"};
def f2:Font = Font{size:16, name:"MyriadPro"};



public class CadreNomStation extends CustomNode {
    public var text:String;

    public var s: Group = Group {
                layoutX:350, layoutY:350,

                content:[
                    Rectangle {
                    arcWidth: 20, arcHeight: 20
                    //fill: bind coul
                    fill: Color.rgb(255,78,78)
                    height:50;
                    width:600;
                    }
                    Rectangle {
                    x:2,y:2
                    arcWidth: 20, arcHeight: 20
                    //fill: bind coul
                    fill: Color.WHITE
                    height:46;
                    width:596;
                    }
                    Text {
                        x:10,y:30,
                        //wrappingWidth:160
                        font: f
                        content: bind "{text}|"
                        textAlignment: TextAlignment.RIGHT
                    }
                ]

    }


    override public function create():Node{
    return s;
    }


}
